package com.example.mgs.listeners;

import com.example.common.constants.MqConstants;
import com.example.common.domain.Messages.Mgs;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class ImagesListener {

    //    修改图片
    @RabbitListener(bindings = @QueueBinding(
            value = @Queue(name = MqConstants.QUEUE_FILE_THUMBNAIL),
            exchange = @Exchange(name = MqConstants.EXCHANGE_FILE, type = ExchangeTypes.TOPIC),
            key = MqConstants.ROUTING_KEY_IMAGE_UPLOAD
    ))
    public void ImagesListener(Mgs mgs) {
    }
}
